<script>

	export default {
		globalData: {  
			permissions:[]  
        }, 
		onLaunch: function() {
			console.log('App Launch')
			// uni.hideTabBar()
			if(uni.getStorageSync('token')){
				this.$api.permissions().then(res => {
					getApp().globalData.permissions = res.data
				})
			}else{
				uni.reLaunch({
							url: '/pages/index/index'
						})
			}

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-ui/index.scss";
	@import "@/scss/index.scss";
</style>